package com.aistar.service.user.impl;

import com.aistar.mapper.EmployeeMapper;
import com.aistar.mapper.UserMapper;
import com.aistar.model.entity.Employee;
import com.aistar.model.entity.User;
import com.aistar.service.user.IAccountSettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class AccountSettingsSeriveImpl implements IAccountSettingsService {
    @Autowired
    private EmployeeMapper employeeMapper;
    @Autowired
    private UserMapper userMapper;

    @Override
    public User setting(Integer id) {
        return userMapper.findById(employeeMapper.findById(id).getUserId());
    }
}
